from sqlalchemy import Column, ForeignKey, Date
from sqlalchemy.orm import relationship
from sqlalchemy.dialects.oracle import VARCHAR2, NUMBER
from app.db.base import Base


# ITE Supervisor Association
class ITESupervisor(Base):
    __tablename__ = 'ITE_SUPERVISOR'
    __table_args__ = {'schema': 'IARO_CAREER'}

    ite_id            = Column(NUMBER, ForeignKey('IARO_CAREER.ITE_DETAIL.ite_id'), primary_key=True)
    supervisor_id     = Column(NUMBER, primary_key=True)
    supervisor_name   = Column(VARCHAR2(100))
    supervisor_email  = Column(VARCHAR2(500))
    ite_report_manager= Column(VARCHAR2(100))
    supervisor_title  = Column(VARCHAR2(500))

    # Relationship back to detail
    detail = relationship("ITEDetail", back_populates="supervisors")